using UnityEngine;
using System.Collections;

public class EventHotSkill : MonoBehaviour {

	public int index;
	GUIButton button;
	void Start ()
	{
		button = gameObject.GetComponent<GUIButton>();
		button.OnClickCallback += OnClick;
	}
	void Update(){
	}
	void OnClick(Vector3 pos){
		if(InventoryController.GetInstance().GetActiveInventory()
		.itemBeingDragged == null)
			return;
		//Setearle el item al CharacterData.
		CharacterDataManager.GetInstance().GetCurrentCharData().hotSkills[index] = 
		InventoryController.GetInstance().GetActiveInventory().itemBeingDragged;
		Debug.Log("SET HOTSKILL");
		InventoryController.GetInstance().GetGUIPanel().DrawHotSkills();
	}
}
